﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ERP_RORZE_TOOL.Common;

namespace ERP_RORZE_TOOL.Tool.NGNoibo
{
    public partial class frm_ImportReportOptionData : Form
    {

        private string table = "Table: InternalNGDetails\r\n";
        private string time = "Time import: " + DateTime.Now.ToString() + "\r\n";
        private string okStr = "Import successfully: ";
        private string errStr = "Import error: ";

        public frm_ImportReportOptionData(int ok, List<Utilities.ListItem> dup, List<Utilities.ListItem> err)
        {
            InitializeComponent();
            okStr += ok.ToString() + " records \r\n";
            okStr += "\r\n";

            //add error
            errStr += err.Count + " records \r\n";
            errStr += "   Line : OrderNo | Quantity : Error\r\n";
            foreach (Utilities.ListItem item in err)
            {
                errStr += "   " + item.ID + " : " + item.Value + " : " + item.Note + "\r\n";
            }
            errStr += "\r\n";


            memoEdit1.Text = table + time + "Total rows: " + (ok + dup.Count + err.Count).ToString() + "\r\n\r\n" + okStr + errStr;
            memoEdit1.Visible = true;
        }
    }
}
